package com.whfc.iot.mach.entity;

import com.whfc.iot.mach.constant.MsgConst;
import lombok.Data;

/**
 * @Description: 硬件报警-请求
 * @author: xugcheng
 * @version: 1.0
 * @date: 2021-01-06 11:04
 */
@Data
public class MachMsg0x08 extends MachMsg {

    /**
     * 角度报警
     */
    private MachWarnrotation rotation;

    public MachMsg0x08() {
        this.setCmd(MsgConst.UPSTREAM_CMD_0x08);
    }

    @Override
    public int getDataLength() {
        int dataLength = 0;
        if (rotation != null) {
            dataLength += rotation.dataLength();
        }
        return dataLength;
    }
}
